home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
N-O
/
New & Old.cpt
/
New and Old FileName
/
card_4157.txt
< prev
next >
Wrap
Text File
|
1987-10-31
|
1KB
|
64 lines
-- card: 4157 from stack: in
-- bmap block id: 0
-- flags: 0000
-- background id: 3203
-- name:
-- part 1 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=126 top=54 right=284 bottom=458
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 14
-- style flags: 8192
-- line height: 18
-- part name:
-- part 2 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=270 top=246 right=298 bottom=415
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Test NewFileName
----- HyperTalk script -----
on mouseUp
get NewFileName( "Save document as?", "test" )
if it is empty then
put "user cancelled" into message box
else
put it into message box
end if
end mouseUp
-- part contents for background part 6
----- text -----
6 of 8
-- part contents for card part 1
----- text -----
NewFileName( <prompt>, <initial filename> )
A typical script for this would be
    on mouseUp
      put NewFileName("Save document as?","") ¬         into targetfile
      if targetfile is not empty then
        -- write text to target file
      end if
    end mouseUp